<%--
  Created by IntelliJ IDEA.
  User: luo
  Date: 2025/5/25
  Time: 10:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="common/header.jsp">
    <jsp:param name="title" value="修改用户信息"/>
</jsp:include>
<%@ include file="common/adminMenu.jsp" %>

<div class="container">
    <div class="message">
        ${message}
    </div>
    <form action="update-user-information" method="post">
        <input type="hidden" name="userId" value="${user.userId}">
        <label>用户名:</label>
        <input type="text" name="username" value="${user.username}">
        <br>
        <label>密码:</label>
        <input type="text" name="password" value="${user.password}">
        <br>
        <label>用户类型:</label>
        <select name="isAdmin">
            <option value="true" ${user.isAdmin ? 'selected' : ''}>管理员</option>
            <option value="false" ${!user.isAdmin ? 'selected' : ''}>社区居民</option>
        </select>
        <input type="submit" name="submit">
    </form>
</div>

<%@ include file="common/footer.jsp" %>

